﻿@using PagedList.Mvc;
@using PagedList;
@model PagedList.IPagedList<WineStore.Models.Sim>
@{
    ViewBag.Title = "SearchByCategory";
    Layout = "~/Views/Shared/HomeLayout.cshtml";
}
@*<script src="../../Scripts/jquery-1.4.4.min.js"></script>
<script type="text/javascript">
    $(function () {
        /* For zebra striping */
        $("table tr:nth-child(odd)").addClass("odd-row");
        /* For cell text alignment */
        $("table td:first-child, table th:first-child").addClass("first");
        /* For removing the last border */
        $("table td:last-child, table th:last-child").addClass("last");
    });
</script>*@

<link href="../../Content/styletablesim.css" rel="stylesheet" />
<!--Sử dụng cho paging-->
<link href="../../Content/PagedList.css" rel="stylesheet" type="text/css" />
<div id="content">

    <table cellspacing="0">
        <tr>
            <th>Mã Số</th>
            <th>Sim</th>
            <th>Giá</th>
            <th>Mạng</th>
            <th>Nhóm</th>
            <th>Đặt Mua</th>
        </tr>
        @foreach (var item in Model)
        {
            <tr>
                <td>@item.SimId</td>
                <td><a class="simnumber" href="../../Home/Order?id=@item.SimId">@item.SimNumber</a></td>
                <td style="color: #CC0000; font-weight: bold;">@item.SimPrice đ</td>
                <td><img src="../../Content/Images/Supplier/@item.Supplier.SupplierImage" width="70" height="21"/></td>
                <td style="color: #006666; font-weight: bold;">@item.CategorySim.CategorySimName</td>
                <td><a class="edit" href="../../Home/Order?id=@item.SimId">Đặt Mua</a></td>
            </tr>
        }

        <tr style="height: 25px;">
            <td colspan="10" style="padding: 0px;">
                <div style="position: relative; top: -10px; left: -30px;">
                    @Html.PagedListPager(Model, page => Url.Action("SearchByCategory", new {page = page, categoryId = @ViewBag.CategoryId }), (PagedListRenderOptions)ViewBag.Pro)
                </div>
            </td>

        </tr>
    </table>

</div>

